<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('角色列表')" />
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="role-form">
					<div class="select-list">
						<ul>
							<li>
								仓库名称：<input type="text" name="repoWare"/>
							</li>
							<li>
								商品品牌：<input type="text" name="brandName"/>
							</li>
							<li>
								商品类型：
								<select name="typeName">
									<option value="-1">请选择</option>
									<option th:each="type:${types}" th:value="${type.typeName}" th:text="${type.typeName}"></option>
								</select>
							</li>
							<li>
								商品名称：<input type="text" name="productName"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
	        
	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table"></table>
			</div>

		</div>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		var editFlag = [[${@permission.hasPermi('storage:ware:edit')}]];
		var removeFlag = [[${@permission.hasPermi('storage:ware:remove')}]];
		var prefix = ctx + "storage/kc";
		

		$(function() {
		    var options = {
		        url: prefix + "/list",
		        createUrl: prefix + "/add",
				detailUrl: prefix + "/details/{id}",
		        updateUrl: prefix + "/edit/{id}",
		        removeUrl: prefix + "/remove",
		        modalName: "仓库",
		        columns: [{
		            checkbox: true
		        },
                {
                   title:'编号',
                    formatter:function(value,row,index) {
                        return $.table.serialNumber((index));
                    }
                },
		        {
		            field: 'repoWare',
		            title: '仓库名称'
		        },
		        {
		            field: 'brandName',
		            title: '商品品牌',
		        },
		        {
		            field: 'typeName',
		            title: '商品类型',
		        },
				{
					field: 'productName',
					title: '商品名称',
				},
				{
					field: 'firmName',
					title: '厂商名称',
				},
				{
					field: 'kcNum',
					title: '商品数量',
				},
				{
					field: 'unit',
					title: '单位',
				}]
		    };
		    $.table.init(options);
		})
	</script>
</body>
</html>